import {fromJS} from 'immutable';

const initialState = fromJS({
    loading: false,
    icon:0.00
});
const reducers = {
    SET_LOADING(state,{loading}){
        return state.set('loading',loading);
    }
};
const clearIcon = {
    CLEAR_ICON(state,{icon}){
        return state.set('icon',icon);
    }
};

export const appReducers = (state = initialState, {type, param}) => {
    if (reducers[type]) {
        return reducers[type](state, param);
    } else {
        return state;
    }
};